package pers.luchuan.controller;

import org.springframework.security.access.annotation.Secured;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/product")
//@RolesAllowed({"ROLE_ADMIN","ROLE_PRODUCT"})//JSR-250注解
public class ProductController {
    @Secured({"ROLE_PRODUCT", "ROLE_ADMIN"})//SpringSecurity注解
//    @PreAuthorize("hasAnyRole('ROLE_ADMIN','ROLE_PRODUCT')")//spring表达式注解
    @RequestMapping("/findAll")
    public String findAll(){
        return "product-list";
    }
}
